package com.ylr.basic.framework.feign.fallback;

import com.ylr.basic.common.dto.EphemeralDataDto;
import com.ylr.base.common.tool.Result;
import com.ylr.basic.common.vo.ephemeral_data.EphemeralDataQueryVo;
import com.ylr.basic.common.vo.ephemeral_data.EphemeralDataVo;
import com.ylr.basic.framework.feign.YbEphemeralDataBaseClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-07-07 15:10:13
 * className: YbEphemeralDataClientFallback
 * version: 1.0
 * description:
 */
public class YbEphemeralDataClientFallback implements YbEphemeralDataBaseClient {

    private static final Logger log = LoggerFactory.getLogger(YbEphemeralDataClientFallback.class);

    @Override
    public Result<Object> saveEphemeralData(EphemeralDataVo ephemeralDataVo) {
        log.warn("basic模块 => 保存临时数据接口，请求失败回调。{}", ephemeralDataVo);
        return Result.fail();
    }

    @Override
    public Result<EphemeralDataDto> getEphemeralData(Long businessId, Integer businessType) {
        log.warn("basic模块 => 获取临时数据接口，请求失败回调。businessId={} businessType={}", businessId, businessType);
        return Result.fail();
    }

    @Override
    public Result<List<EphemeralDataDto>> batchGetEphemeralData(EphemeralDataQueryVo ephemeralDataQueryVo) {
        log.warn("basic模块 => 批量获取临时数据接口，请求失败回调。{}", ephemeralDataQueryVo);
        return Result.fail();
    }

    @Override
    public Result<Object> deleteEphemeralData(Long businessId, Integer businessType) {
        log.warn("basic模块 => 删除临时数据接口，请求失败回调。businessId={} businessType={}", businessId, businessType);
        return Result.fail();
    }
}
